<template>
  <div class="vipConfig ba_f pad_20">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="基础设置" name="1">
        <basics-config></basics-config>
      </el-tab-pane>
      <el-tab-pane label="会员权益" name="2">
        <vip-qy></vip-qy>
      </el-tab-pane>
      <el-tab-pane label="购卡返利" name="3">
        <vip-fl></vip-fl>
      </el-tab-pane>
      <el-tab-pane label="周期返利" name="4">
        <vip-rebate></vip-rebate>
      </el-tab-pane>
      <el-tab-pane label="优惠券" name="5">
        <vip-coupon></vip-coupon>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import BasicsConfig from './components/basics-config.vue';
import VipCoupon from './components/vip-coupon.vue';
import VipFl from './components/vip-fl.vue';
import VipQy from './components/vip-qy.vue';
import VipRebate from './components/vip-rebate.vue';
export default {
  components: { BasicsConfig, VipQy, VipRebate, VipFl, VipCoupon },
  data() {
    return {
      activeName: sessionStorage.getItem('vipConfigTab') || '1'
    };
  },
  methods: {
    handleClick(msg) {
      this.activeName = msg.name;
      sessionStorage.setItem('vipConfigTab', msg.name);
    }
  }
};
</script>
